package movee.domain.api;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

/**
 *
 *
 * @author movee
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ExceptionResponse extends ApiResponse {

    private String requestId;
    private Errors errors;

    public ExceptionResponse(String requestId, Integer code, String message) {
        super(code, message);
        this.requestId = requestId;
    }

    public String getRequestId() {
        return requestId;
    }

    public Errors getErrors() {
        return errors;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Errors {
        private List<String> exceptStack = new ArrayList<>();
        private Object detail = "";
    }

}
